package com.whfc.common.enums;

/**
 * 权限平台
 *
 * @author : qzexing
 * @version : 1.0
 * @date : 2020/7/7 16:46
 */
public enum SysRulePlatform {

    MS(1, "后台"),

    MP(2, "小程序"),

    OPEN(3, "开放接口");

    private Integer value;

    private String desc;

    SysRulePlatform(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public static SysRulePlatform parseValue(Integer value) {
        switch (value) {
            case 1:
                return MS;
            case 2:
                return MP;
            default:
                return null;
        }
    }
}
